package sinoservices.hayden.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import sinoservices.hayden.bean.Userinfo;

import java.util.List;

@FeignClient("userInfoServer")
public interface UserInfoService {
    /**
     * 新增用户
     * @return
     */
    @RequestMapping("/userInfoService/saveUser")
    int saveUser (@RequestBody Userinfo userinfo);
    /**
     * 根据id删除
     * @return
     */
    @GetMapping("userInfoService/deleteUserById")
    int deleteUserById (@RequestParam("id") int id);
    /**
     * 更新用户信息
     * @return
     */
    @PostMapping("/userInfoService/updateUser")
    int updateUser (@RequestBody Userinfo userinfo);
    /**
     * 根据id查询用户信息
     * @return
     */
    @GetMapping("/userInfoService/getUserInfo")
    Userinfo getUserInfo(@RequestParam("id") int id);
    /**
     * 查询所有用户信息
     * @return
     */
    @PostMapping("/userInfoService/selectAllUser")
    List<Userinfo> selectAllUser ();
}
